﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Data;

namespace Presentation
{
    public partial class MateriaCadastro : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {


            try
            {
               String nome = txtMateria.Text;
               int carga = Convert.ToInt32(txtCargaHoraria.Text);


                using (DBUCNEntities banco = new DBUCNEntities())
                {
                    //banco.AddToTBNoticias(noticia);
                    banco.SaveChanges();
                }
                Response.Redirect("NoticiaCadastro.aspx");

            }
            catch (Exception)
            {

                throw;
            } 


        }
    }
}